import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import {ToolbarComponent} from './toolbar/toolbar.component'
import {MoviesComponent} from './movies/movies.component'
import {MovieDetailComponent} from './movie-detail/movie-detail.component'
import {InterestComponent} from './interest/interest.component'
import {SearchComponent} from './search/search.component'
import {ScoreComponent} from './score/score.component'
const routes: Routes = [
  { path: 'home',
    component: ToolbarComponent,
    children: [
      {
        path: 'movies',
        component: MoviesComponent
      },
      {
        path: 'detail/:id',
        component: MovieDetailComponent
      },
      {
        path:'search/:keyword',
        component:SearchComponent
      },
      {
        path:'interest',
        component:InterestComponent
      },
      {
        path:'score',
        component:ScoreComponent
      }
    ] },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class FirstPageRoutingModule { }
